import com.badlogic.gdx.Gdx
import com.badlogic.gdx.Graphics
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration
import com.badlogic.gdx.graphics.GL10


var Graphics.floatWidth: Float
    get() = this.width.toFloat()
    set(value) = Unit

var Graphics.floatHeight: Float
    get() = this.height.toFloat()
    set(value) = Unit


inline fun clear(red: Int = 1, green: Int = 1, blue: Int = 1, alpha: Float = 1f)
{
    Gdx.gl.glClearColor(red.toFloat(), green.toFloat(), blue.toFloat(), alpha)
    Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT)
}

inline fun config(block: LwjglApplicationConfiguration.() -> Unit): LwjglApplicationConfiguration
{
    val config = LwjglApplicationConfiguration()
    block.invoke(config)
    return config
}
